Background Noise Recorder

ABSTRACT

An electronic device may include wireless circuitry with a transmit antenna that transmits signals and a receive antenna that receives reflected signals. The wireless circuitry may detect a range between the device and an external object based on the transmitted signals and the reflected signals. When the range exceeds a first threshold, the wireless circuitry may use the transmitted signals and received signals to record background noise. When the range is less than a second threshold value, the wireless circuitry may detect the range based on the reflected signals and the recorded background noise. This may allow the range to be accurately measured within an ultra-short range domain even when the device is placed in different device cases, placed on different surfaces, etc.

BACKGROUND NOISE RECORDER

This application claims the benefit of U.S. provisional patentapplication No. 63/248,169, filed Sep. 24, 2021, which is herebyincorporated by reference herein in its entirety.

FIELD

This disclosure relates generally to electronic devices and, moreparticularly, to electronic devices with wireless circuitry.

BACKGROUND

Electronic devices are often provided with wireless capabilities. Anelectronic device with wireless capabilities has wireless circuitry thatincludes one or more antennas. The wireless circuitry is sometimes usedto perform spatial ranging operations in which radio-frequency signalsare used to estimate a distance between the electronic device and anexternal object.

It can be challenging to provide wireless circuitry that accuratelyestimates this distance, particularly at short ranges.

SUMMARY

An electronic device may include wireless circuitry controlled by one ormore processors. The wireless circuitry may include a transmit antennaand a receive antenna. The transmit antenna may transmit radio-frequencysignals. The receive antenna may receive reflected signals correspondingto the transmitted radio-frequency signals. The wireless circuitry maydetect a range between the device and an external object based on thetransmitted radio-frequency signals and the received reflected signals.

When the range exceeds a first threshold value (e.g., in a long-rangedomain), the wireless circuitry may use the transmitted and receivedsignals to record background noise associated with the absence of theexternal object near the device. When the range is less than a secondthreshold value (e.g., within an ultra-short range (USR) domain), theone or more processors may detect the range based on the receivedreflected signals and the recorded background noise. For example, theone or more processors may identify phase information from the receivedreflected signals and may subtract the recorded background noise fromthe phase information. This may allow the range to be accuratelymeasured within the USR domain even when the device is placed indifferent device cases, placed on different surfaces, etc.

An aspect of the disclosure provides a method of operating an electronicdevice. The method can include with wireless circuitry, transmittingradio-frequency signals and receiving reflected signals to identify arange between an external object and the electronic device. The methodcan include when the range exceeds a threshold value, controlling thewireless circuitry to record background noise using the transmittedradio-frequency signals. The method can include with the wirelesscircuitry, performing phase measurements from the received reflectedsignals. The method can include with the wireless circuitry, detectingthe range based on the phase measurements and the recorded backgroundnoise.

An aspect of the disclosure provides a method of operating an electronicdevice. The method can include with wireless circuitry, performingfrequency-modulated continuous-wave (FMCW) radar operations to identifya range between an external object and the electronic device bytransmitting radio-frequency signals and receiving reflected signals.The method can include when the range exceeds a first threshold value,recording background noise at the wireless circuitry using thetransmitted radio-frequency signals. The method can include when therange is less than a second threshold value that is lower than the firstthreshold value, performing phase measurements from the receivedreflected signals and detecting the range based on the phasemeasurements and the recorded background noise.

An aspect of the disclosure provides an electronic device. Theelectronic device can include one or more antennas configured totransmit radio-frequency signals and configured to receive reflectedsignals. The electronic device can include one or more processors. Theone or more processors can be configured to identify a range between theelectronic device and an external object based on the reflected signalsreceived by the one or more antennas. The one or more processors can beconfigured to, when the range exceeds a first threshold value, recordbackground noise using the radio-frequency signals transmitted by theone or more antennas and corresponding signals received by the one ormore antennas. The one or more processors can be configured to, when therange is less than a second threshold value that is lower than the firstthreshold value, detect the range based on phase measurements from thereflected signals received by the one or more antennas and based on therecorded background noise.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a functional block diagram of an illustrative electronicdevice having radar circuitry in accordance with some embodiments.

FIG. 2 is a circuit diagram of illustrative radar circuitry withreconfigurable filters for performing long range and ultra-short range(USR) detection in accordance with some embodiments.

FIGS. 3 and 4 are diagrams of illustrative transmit signals that may beused by radar circuitry to perform long range and USR detection inaccordance with some embodiments.

FIG. 5 is a flow chart of illustrative operations involved in using anelectronic device to perform both long range and USR detection inaccordance with some embodiments.

FIG. 6 is a plot of group delay as a function of range that shows howusing radar circuitry to measure group delay may allow the radarcircuitry to detect distance in accordance with some embodiments.

FIG. 7 is a diagram showing how an illustrative high pass filter may beused to maximize signal-to-noise ratio for long range detection inaccordance with some embodiments.

FIG. 8 is a flow chart of illustrative operations involved in performingbackground recording and cancellation in accordance with someembodiments.

FIG. 9 is a flow chart of illustrative operations involved in performingbackground recording and cancellation for short range and USR detectionin accordance with some embodiments.

FIG. 10 is a flow chart of illustrative operations involved inperforming background recording and cancellation for a hybrid radar thatperforms long range and USR detection in accordance with someembodiments.

DETAILED DESCRIPTION

Electronic device 10 of FIG. 1 may be a computing device such as alaptop computer, a desktop computer, a computer monitor containing anembedded computer, a tablet computer, a cellular telephone, a mediaplayer, or other handheld or portable electronic device, a smallerdevice such as a wristwatch device, a pendant device, a headphone orearpiece device, a device embedded in eyeglasses or other equipment wornon a user's head, or other wearable or miniature device, a television, acomputer display that does not contain an embedded computer, a gamingdevice, a navigation device, an embedded system such as a system inwhich electronic equipment with a display is mounted in a kiosk orautomobile, a wireless internet-connected voice-controlled speaker, ahome entertainment device, a remote control device, a gaming controller,a peripheral user input device, a wireless base station or access point,equipment that implements the functionality of two or more of thesedevices, or other electronic equipment.

As shown in the functional block diagram of FIG. 1 , device 10 mayinclude components located on or within an electronic device housingsuch as housing 12. Housing 12, which may sometimes be referred to as acase, may be formed of plastic, glass, ceramics, fiber composites, metal(e.g., stainless steel, aluminum, metal alloys, etc.), other suitablematerials, or a combination of these materials. In some situations,parts or all of housing 12 may be formed from dielectric or otherlow-conductivity material (e.g., glass, ceramic, plastic, sapphire,etc.). In other situations, housing 12 or at least some of thestructures that make up housing 12 may be formed from metal elements.

Device 10 may include control circuitry 14. Control circuitry 14 mayinclude storage such as storage circuitry 16. Storage circuitry 16 mayinclude hard disk drive storage, nonvolatile memory (e.g., flash memoryor other electrically-programmable-read-only memory configured to form asolid-state drive), volatile memory (e.g., static or dynamicrandom-access-memory), etc. Storage circuitry 16 may include storagethat is integrated within device 10 and/or removable storage media.

Control circuitry 14 may include processing circuitry such as processingcircuitry 18. Processing circuitry 18 may be used to control theoperation of device 10. Processing circuitry 18 may include on one ormore microprocessors, microcontrollers, digital signal processors, hostprocessors, baseband processor integrated circuits, application specificintegrated circuits, central processing units (CPUs), etc. Controlcircuitry 14 may be configured to perform operations in device 10 usinghardware (e.g., dedicated hardware or circuitry), firmware, and/orsoftware. Software code for performing operations in device 10 may bestored on storage circuitry 16 (e.g., storage circuitry 16 may includenon-transitory (tangible) computer readable storage media that storesthe software code). The software code may sometimes be referred to asprogram instructions, software, data, instructions, or code. Softwarecode stored on storage circuitry 16 may be executed by processingcircuitry 18.

Control circuitry 14 may be used to run software on device 10 such assatellite navigation applications, internet browsing applications,voice-over-internet-protocol (VOIP) telephone call applications, emailapplications, media playback applications, operating system functions,etc. To support interactions with external equipment, control circuitry14 may be used in implementing communications protocols. Communicationsprotocols that may be implemented using control circuitry 14 includeinternet protocols, wireless local area network (WLAN) protocols (e.g.,IEEE 802.11 protocols—sometimes referred to as Wi-Fi®), protocols forother short-range wireless communications links such as the Bluetooth®protocol or other wireless personal area network (WPAN) protocols, IEEE802.11ad protocols (e.g., ultra-wideband protocols), cellular telephoneprotocols (e.g., 3G protocols, 4G (LTE) protocols, 3GPP 5G protocols, 6Gprotocols, etc.), antenna diversity protocols, satellite navigationsystem protocols (e.g., global positioning system (GPS) protocols,global navigation satellite system (GLONASS) protocols, etc.),antenna-based spatial ranging protocols (e.g., radio detection andranging (RADAR) protocols or other desired range detection protocols forsignals conveyed at millimeter and centimeter wave frequencies), or anyother desired communications protocols. Each communications protocol maybe associated with a corresponding radio access technology (RAT) thatspecifies the physical connection methodology used in implementing theprotocol.

Device 10 may include input-output circuitry 20. Input-output circuitry20 may include input-output devices 22. Input-output devices 22 may beused to allow data to be supplied to device 10 and to allow data to beprovided from device 10 to external devices. Input-output devices 22 mayinclude user interface devices, data port devices, and otherinput-output components. For example, input-output devices 22 mayinclude touch sensors, displays (e.g., touch-sensitive and/orforce-sensitive displays), light-emitting components such as displayswithout touch sensor capabilities, buttons (mechanical, capacitive,optical, etc.), scrolling wheels, touch pads, key pads, keyboards,microphones, cameras, buttons, speakers, status indicators, audio jacksand other audio port components, digital data port devices, motionsensors (accelerometers, gyroscopes, and/or compasses that detectmotion), capacitance sensors, proximity sensors, magnetic sensors, forcesensors (e.g., force sensors coupled to a display to detect pressureapplied to the display), etc. In some configurations, keyboards,headphones, displays, pointing devices such as trackpads, mice, andjoysticks, and other input-output devices may be coupled to device 10using wired or wireless connections (e.g., some of input-output devices22 may be peripherals that are coupled to a main processing unit orother portion of device 10 via a wired or wireless link).

Input-output circuitry 20 may include wireless circuitry 24 to supportwireless communications. Wireless circuitry 24 (sometimes referred toherein as wireless communications circuitry 24) may include two or moreantennas 40. Wireless circuitry 24 may also include baseband processorcircuitry, transceiver circuitry, amplifier circuitry, filter circuitry,switching circuitry, radio-frequency transmission lines, and/or anyother circuitry for transmitting and/or receiving radio-frequencysignals using antennas 40.

Wireless circuitry 24 may transmit and/or receive radio-frequencysignals within a corresponding frequency band at radio frequencies(sometimes referred to herein as a communications band or simply as a“band”). The frequency bands handled by radios 28 may include wirelesslocal area network (WLAN) frequency bands (e.g., Wi-Fi® (IEEE 802.11) orother WLAN communications bands) such as a 2.4 GHz WLAN band (e.g., from2400 to 2480 MHz), a 5 GHz WLAN band (e.g., from 5180 to 5825 MHz), aWi-Fi® 6E band (e.g., from 5925-7125 MHz), and/or other Wi-Fi® bands(e.g., from 1875-5160 MHz), wireless personal area network (WPAN)frequency bands such as the 2.4 GHz Bluetooth® band or other WPANcommunications bands, cellular telephone frequency bands (e.g., bandsfrom about 600 MHz to about 5 GHz, 3G bands, 4G LTE bands, 5G New RadioFrequency Range 1 (FR1) bands below 10 GHz, 5G New Radio Frequency Range2 (FR2) bands between 20 and 60 GHz, etc.), other centimeter ormillimeter wave frequency bands between 10-300 GHz, near-fieldcommunications frequency bands (e.g., at 13.56 MHz), satellitenavigation frequency bands (e.g., a GPS band from 1565 to 1610 MHz, aGlobal Navigation Satellite System (GLONASS) band, a BeiDou NavigationSatellite System (BDS) band, etc.), ultra-wideband (UWB) frequency bandsthat operate under the IEEE 802.15.4 protocol and/or otherultra-wideband communications protocols, communications bands under thefamily of 3GPP wireless communications standards, communications bandsunder the IEEE 802.XX family of standards, and/or any other desiredfrequency bands of interest.

Antennas 40 may be formed using any desired antenna structures. Forexample, antennas 40 may include antennas with resonating elements thatare formed from loop antenna structures, patch antenna structures,inverted-F antenna structures, slot antenna structures, planarinverted-F antenna structures, helical antenna structures, monopoleantennas, dipoles, hybrids of these designs, etc. Filter circuitry,switching circuitry, impedance matching circuitry, and/or other antennatuning components may be adjusted to adjust the frequency response andwireless performance of antennas 40 over time.

The radio-frequency signals handled by antennas 40 may be used to conveywireless communications data between device 10 and external wirelesscommunications equipment (e.g., one or more other devices such as device10). Wireless communications data may be conveyed by wireless circuitry24 bidirectionally or unidirectionally. The wireless communications datamay, for example, include data that has been encoded into correspondingdata packets such as wireless data associated with a telephone call,streaming media content, internet browsing, wireless data associatedwith software applications running on device 10, email messages, etc.

Wireless circuitry 24 may additionally or alternatively perform spatialranging operations using antennas 40. In scenarios where wirelesscircuitry 24 both conveys wireless communications data and performsspatial ranging operations, one or more of the same antennas 40 may beused to both convey wireless communications data and perform spatialranging operations. In another implementation, wireless circuitry 24 mayinclude a set of antennas 40 that only conveys wireless communicationsdata and a set of antennas 40 that is only used to perform spatialranging operations.

When performing spatial ranging operations (sometimes referred to hereinas range detection operations, ranging operations, or radar operations),antennas 40 may transmit radio-frequency signals 36. Wireless circuitry24 may transmit radio-frequency signals 36 in a corresponding radiofrequency band such (e.g., a frequency band that includes frequenciesgreater than around 10 GHz, greater than around 20 GHz, less than 10GHz, etc.). Radio-frequency signals 36 may reflect off of objectsexternal to device 10 such as external object 34. External object 34 maybe, for example, the ground, a building, a wall, furniture, a ceiling, aperson, a body part, an accessory device, a game controller, an animal,a vehicle, a landscape or geographic feature, an obstacle, or any otherobject or entity that is external to device 10. Antennas 40 may receivereflected radio-frequency signals 38. Reflected signals 38 may be areflected version of the transmitted radio-frequency signals 36 thathave reflected off of external object 34 and back towards device 10.

Control circuitry 14 may process the transmitted radio-frequency signals36 and the received reflected signals 38 to detect or estimate the rangeR between device 10 and external object 34. If desired, controlcircuitry 14 may also process the transmitted and received signals toidentify a two or three-dimensional spatial location (position) ofexternal object 34, a velocity of external object 34, and/or an angle ofarrival of reflected signals 38. In one implementation that is describedherein as an example, wireless circuitry 24 performs spatial rangingoperations using a frequency-modulated continuous-wave (FMCW) radarscheme. This is merely illustrative and, in general, other radar schemesor spatial ranging schemes may be used (e.g., an OFDM radar scheme, anFSCW radar scheme, a phase coded radar scheme, etc.).

To support spatial ranging operations, wireless circuitry 24 may includespatial ranging circuitry such as radar circuitry 26. In one embodimentthat is sometimes described herein as an example, radar circuitry 26includes FMCW radar circuitry that performs spatial ranging using anFMCW radar scheme. Radar circuitry 26 may therefore sometimes bereferred to herein as FMCW radar circuitry 26. Radar circuitry 26 mayuse one or more antennas 40 to transmit radio-frequency signals 36(e.g., as a continuous wave of radio-frequency energy under an FMCWradar scheme). One or more antennas 40 may also receive reflectedsignals 38 (e.g., as a continuous wave of radio-frequency energy underthe FMCW radar scheme). Radar circuitry 26 may process radio-frequencysignals 36 and reflected signals 38 to identify/estimate range R, theposition of external object 34, the velocity of external object 34,and/or the angle-of-arrival of reflected signals 38. In embodimentswhere radar circuitry 26 uses an FMCW radar scheme, doppler shifts inthe continuous wave signals may be detected and processed to identifythe velocity of external object 34 and the time dependent frequencydifference between radio-frequency signals 36 and reflected signals 38may be detected and processed to identify range R and/or the position ofexternal object 34. Use of continuous wave signals for estimating rangeR may allow control circuitry 10 to reliably distinguish betweenexternal object 34 and other background or slower-moving objects, forexample.

As shown in FIG. 1 , radar circuitry 26 may include transmit (TX) signalgenerator circuitry such as transmit signal generator 28. Transmitsignal generator 28 may generate transmit signals for transmission overantenna(s) 40. In some implementations that are described herein as anexample, transmit signal generator 28 includes a chirp generator thatgenerates chirp signals for transmission over antenna(s) 40 (e.g., inembodiments where radar circuitry 26 uses an FMCW radar scheme).Transmit signal generator 28 may therefore sometimes be referred toherein as chirp generator 28. Transmit signal generator 28 may, forexample, produce chirp signals that are transmitted as a continuous waveof radio-frequency signals 36. The chirp signals may be formed byperiodically ramping up the frequency of the transmitted signals in alinear manner over time, for example. Radar circuitry 26 may alsoinclude digital-to-analog converter (DAC) circuitry such as DAC 32. DAC32 may convert the transmit signals (e.g., the chirp signals) from thedigital domain to the analog domain prior to transmission by antennas 40(e.g., in radio-frequency signals 36). Radar circuitry 26 may alsoinclude analog-to-digital converter (ADC) circuitry such as ADC 42. ADC42 may convert signals from the analog domain to the digital domain forsubsequent processing by control circuitry 14. If desired, radarcircuitry 26 may include distortion circuitry 30. Distortion circuitry30 may include predistortion circuitry that predistorts the transmitsignals prior to transmission by antennas 40 and/or may includepost-distortion circuitry that distorts received signals.

The example of FIG. 1 is merely illustrative. While control circuitry 14is shown separately from wireless circuitry 24 in the example of FIG. 1for the sake of clarity, wireless circuitry 24 may include processingcircuitry (e.g., one or more processors) that forms a part of processingcircuitry 18 and/or storage circuitry that forms a part of storagecircuitry 16 of control circuitry 14 (e.g., portions of controlcircuitry 14 may be implemented on wireless circuitry 24). As anexample, control circuitry 14 may include baseband circuitry (e.g., oneor more baseband processors), digital control circuitry, analog controlcircuitry, and/or other control circuitry that forms part of radarcircuitry 26. The baseband circuitry may, for example, access acommunication protocol stack on control circuitry 14 (e.g., storagecircuitry 20) to: perform user plane functions at a PHY layer, MAClayer, RLC layer, PDCP layer, SDAP layer, and/or PDU layer, and/or toperform control plane functions at the PHY layer, MAC layer, RLC layer,PDCP layer, RRC, layer, and/or non-access stratum layer. If desired, thePHY layer operations may additionally or alternatively be performed byradio-frequency (RF) interface circuitry in wireless circuitry 24.

If desired, radar circuitry 26 may be used to measure the proximity of ahuman body to antennas 40. Measurement of this proximity (e.g., range R)may allow the device to adjust the transmit power level of antennas 40(e.g., based on range R) to ensure that wireless circuitry 24 complieswith regulatory requirements on radio-frequency exposure (RFE). Forexample, the transmit power level and/or transmit duration of thewireless circuitry can be reduced and/or different antennas can beswitched into use when range R is small to ensure compliance with theserequirements. When no external object 34 is located close to antennas 40(e.g., when range R is high), wireless circuitry 24 may transmitradio-frequency signals at a maximum transmit power level, therebymaximizing throughput. In general, radar circuitry 26 needs to be veryaccurate to perform such detection of a human body (sometimes referredto herein as body proximity sensing (BPS)). However, a relatively highdynamic range is needed to resolve a wide number of ranges R (e.g.,limits in dynamic range can limit the overall detection range of radarcircuitry 26). If care is not taken, it can be difficult to configureradar circuitry 26 to detect range R over both relatively long distances(e.g., ranges greater than around 10 cm, generally referred to herein as“long range”) and relatively short distances (e.g., ranges less thanaround 10 cm, generally referred to herein as “ultra-short range (USR)”)with sufficient dynamic range.

To allow radar circuitry 26 to perform spatial ranging operations withinboth the long range domain (sometimes referred to herein as the farfield domain) and within the USR domain, radar circuitry 26 may includereconfigurable high pass filters. FIG. 2 is a circuit diagram of radarcircuitry 26 having reconfigurable high pass filters.

As shown in FIG. 2 , radar circuitry 26 may include a transmit chain 52(sometimes referred to herein as transmitter chain 52, transmit line-up52, or transmit path 52) and a receive chain 54 (sometimes referred toherein as receiver chain 54, receive line-up 54, or receive path 52).Transmit (TX) chain 52 may include a digital-to-analog converter (DAC)such as DAC 62. DAC 62 may include an in-phase (I) DAC 62I that operateson in-phase (I) signals and a quadrature-phase (Q) DAC 62Q that operateson quadrature-phase (Q) signals (e.g., of an I/Q signal pair). Transmitchain 52 may include mixers 68 (e.g., an in-phase mixer 68I and aquadrature phase mixer 68Q) having first inputs coupled to the outputsof DACs 62I and 62Q and having second inputs coupled to clockingcircuitry such as local oscillator (LO) 66. Mixers 68 may have outputscoupled to the input of power amplifier (PA) 70 in transmit chain 52.The output of PA 70 may be coupled to a first antenna 40 (FIG. 1 ).

Receive (RX) chain 54 may include a low noise amplifier (LNA) 72 andmixers 74 (e.g., an in-phase mixer 74I and a quadrature-phase mixer 74Q)having first inputs coupled to the output of LNA 72 and having secondinputs coupled to LO 66. The input of LNA 72 may be coupled to a secondantenna 40 (FIG. 1 ). Receive chain 54 may include high pass filters 76having inputs coupled to mixers 74 and having outputs coupled toanalog-to-digital converter (ADC) 64 (e.g., an in-phase (I) ADC 64I anda quadrature-phase (Q) ADC 34Q). For example, a first high pass filter76I may be interposed between the output of mixer 74I and the input ofADC 64I and a second high pass filter 76Q may be interposed between theoutput of mixer 74Q and the input of ADC 64Q. The outputs of ADC 64I and64Q and the inputs of DACs 62I and 62Q may be coupled to digital signalprocessor (DSP) 50. DSP 50 may include a digital background (BG)canceller 56, FMCW or other long range radar circuitry such as FMCWcircuitry 58, and phase detector 60.

High pass filters 76I and 76Q may be reconfigurable (bypassable). Forexample, a bypass path 78I may couple the input of high pass filter(HPF) 76I to the output of HPF 76I. Similarly, a bypass path 78Q maycouple the input of HPF 76Q to the output of HPF 76Q.

Switches such as switches (SW) 80 may be disposed on bypass paths 78Iand 78Q. If desired, an optional all pass filter (APF) 82 may bedisposed on bypass paths 78I and 78Q (e.g., between switch 80 and ADC64). Switches 80 may have a first state (e.g., where switches 80 areclosed or turned on) in which HPFs 76 are bypassed and may have a secondstate (e.g., where switches 80 are open or turned off) in which HPFs 76are switched into use and bypass paths 78 form open circuits.

If desired, a feedback path 84 may couple transmit chain 52 to receivechain 54. A de-chirp path may additionally or alternatively coupletransmit chain 52 to a de-chirp mixer in receive chain 54. As shown inFIG. 2 , feedback path 84 may include an optional multi-tab analoginterference canceller 86 having an output coupled to an adder such asadder 87 in receive chain 54. Adder 87 and/or feedback path 84 may beomitted if desired. The example of FIG. 2 is merely illustrative. Ingeneral, other circuit architectures may be used to form radar circuitry26. Additional filters, amplifiers, switches, delay stages, splitters,and/or other circuit components may be formed at other locations inradar circuitry 26.

When performing spatial ranging (radar) operations, transmit signalgenerator 28 (FIG. 1 ) may generate transmit signals (e.g., digitalchirp signals) for subsequent transmission by the antenna coupled totransmit chain 52 (e.g., using a continuous wave of radio-frequencyenergy). FMCW circuitry 58 may, for example, control the transmit signalgenerator to generate desired transmit signal waveforms. If desired,digital BG canceler 56 may perform background cancellation(pre-compensation) on the generated transmit signals. DAC 62 may convertthe transmit signals to the digital domain. Mixers 68 may upconvert thetransmit signals to radio frequencies or intermediate frequencies forlater upconversion to radio-frequencies (e.g., using a local oscillator(LO) signal from LO 66). These frequencies may be 5G NR FR1 or FR2frequencies, for example. PA 70 may amplify the transmit signals fortransmission by the corresponding antenna 40 coupled to transmit chain52 (e.g., as radio-frequency signals 36 of FIG. 1 ).

The antenna 40 coupled to receive chain 54 may receive reflected signals38 (e.g., a reflected version of the transmit signals transmitted overtransmit chain 52). LNA 72 may amplify the received reflected signals38. Mixers 74 may downconvert the reflected signals to baseband. Duringlong range detection, switches 80 may be open (e.g., bypass paths 78 mayform open circuits) and HPFs 76 may filter the received reflectedsignals to output filtered signals. ADC 64 may convert the filteredsignals to the digital domain for subsequent processing by DSP 50. FMCWcircuitry 58 may process the transmit signals provided to transmit chain52 and the reflected signals received over receive chain 54 to identifyrange R to external object 34. For example, FMCW circuitry 58 may detect(e.g., identify) time delays between the transmitted and receivedsignals, may generate time of flight (TOF) information for the signals,and may identify (e.g., generate, compute, calculate, etc.) range R fromthe TOF information. HPFs 76 may serve to filter outleakage/interference signal (e.g., from coupling or a dielectric coverlayer on device 10 through which the radio-frequency signals andreflected signals pass) from the received reflected signals, therebymaximizing the signal-to-noise ratio SNR and dynamic range of thereceived signals to allow for accurate long range measurements of rangeR.

When performing USR measurements, the high dynamic range required forlong range detection is not needed. As such, HPFs 76 may be bypassed orswitched out of use while performing USR measurements. For example,switches 80 may be closed, allowing the received reflected signals topass from mixers 74 directly to ADC 64 without being filtered. Ifdesired, APFs 82 may filter these signals to correct for imperfectionsin the channel response, for example. Phase detector 60 may process thereceived reflected signals to identify (e.g., generate, detect,estimate, measure, etc.) the phase and/or phase delay of the signals(e.g., group phase delay), in a process sometimes referred to herein asperforming phase measurements. Control circuitry 14 (FIG. 1 ) maydetermine (e.g., identify, generate, calculate, etc.) range R based onthe identified phase delay (based on the phase measurements). Ifdesired, digital BG canceller 56 may perform BG noise cancellation onthe transmitted and/or received signals used to perform USR detection.HPFs 76 may be replaced with DC notch filters if desired.

FIG. 3 is a diagram (in frequency as a function of time) of illustrativetransmit signals that may be transmitted over transmit chain 52 forperforming long range and USR detection. Curve 100 plots a digital FMCWor continuous FMCW signal (e.g., a frequency ramp or chirp signal) thatmay be transmitted for performing long range detection (e.g., while HPFs76 are switched into use in the receive chain). Curve 102 plots discretefrequencies (e.g., a step function in frequency versus time) that may beused in the transmit signal for performing USR detection. If desired, LO66 may generate coarse steps LO_1 through LO_N used in generating thetransmit signal whereas the finer steps or continuous steps are providedfrom DAC 62 of FIG. 2 . The example of FIG. 3 is merely illustrativeand, in general, curves 100 and 102 may have other shapes.

FIG. 4 is a plot of the transmit signals associated with curve 102 ofFIG. 3 that may be used in performing USR detection, but in units ofpower as a function of frequency. As shown in FIG. 4 , the transmitsignal involves a series of peaks (lines) 104 each separated byfrequency gap Δf. Control circuitry 16 may process the transmit signalassociated with peaks 104 as well as the reflected version of thetransmit signal (e.g., as received while HPFs 76 are bypassed) toidentify range R to the external object (e.g., using equation 106). Asshown by equation 106, distance d (range R) may be computed as afunction of the measured phase delay detected by phase detector 60 fromthe received reflected version of transmit signal 104 (e.g., where Ω_(d)is a factor that accounts for the phase delay, c₀ is the speed of light,and τ is a complex phase delay factor). Control circuitry 14 mayidentify range R (distance d) using equation 106 or by comparing themeasured phase delay to a look up table of predetermined phase delaysstored on device 10 (e.g., where each stored phase delay corresponds toa stored distance d that is retrieved by comparing the measured phasedelay to the predetermined phase delays in the look up table).

FIG. 5 is a flow chart of illustrative operations involved in performingranging using radar circuitry 26. At operation 110, radar circuitry 26may begin recording (gathering) background noise measurements. Forexample, radar circuitry 26 may perform USR detection when no objectsare present near device 10 to measure background noise associated withthe housing for device 10, a removable case on device 10, etc. Thisbackground noise may later be subtracted off of subsequent USRdetections to generate accurate ranges R for objects within 10 cm.

At operation 112, radar circuitry 26 may perform long range detection(e.g., using the transmit signal associated with curve 100 of FIG. 3 ,such as using an FMCW scheme and transmit signal). HPFs 76 may beswitched into use and may filter the received reflected signals tomaximize dynamic range. Control circuitry 14 may identify range R basedon the transmitted and reflected signals (e.g., by identifying TOFinformation from time delays between the transmitted and reflectedsignals).

At operation 114, radar circuitry 26 may perform USR detection (e.g.,using the transmit signal associated with curve 102 of FIG. 3 ). HPFs 76may be switched out of use (bypassed). Phase detector 60 may measure thephase delay of the received reflected signals (e.g., may perform phasemeasurements). Control circuitry 16 may process the phase delay toidentify range R based on the phase delay (e.g., either as input to afunction or by comparison to stored information such as look up tableinformation mapping predetermined/calibrated ranges to phase delays).Control circuitry 16 may also perform background noise cancellationusing the gathered BG measurements to ensure that the identified range Ris accurate (at operation 116). The background noise cancellation mayoccur in the digital domain, for example (e.g., at DSP 50 of FIG. 2 ).Processing may then loop back to path 112 via path 118 (e.g., radarcircuitry 26 may perform long range detection and USR detection in atime-interleaved/duplexed manner).

If desired, analog interference cancellation may also be performed usingmulti-tab AIC 86 of FIG. 2 . For example, AIC 86 may be used to performcoefficient adaption from background measurements and analog multi-tabcancellation may be performed. However, analog interference cancellationmay undesirably increase RF hardware complexity, reduce tunability, anddegrade SNR. Performing digital BG cancellation using digital BGcanceller 56 of FIG. 2 may allow DSP 50 to perform coefficientadaptation from background measurements, where the backgroundmeasurements are subtracted in the complex domain from the transmittedand/or received signals (e.g., at operation 116 of FIG. 5 ). Digital BGcancellation may involve greater hardware flexibility than analogcancellation.

FIG. 6 is a plot showing how measured group delay may vary as a functionof distance (range R) to external object 34. As shown by curve 120,group delay generally increases as range (distance) R increases.Bypassing HPFs 76 and performing digital BG cancellation may allowdevice 10 to perform USR detection based on the measured group delaywith finer resolution than would otherwise be possible (e.g., within 4cm or less).

FIG. 7 is a plot showing how HPFs 76 may be used to maximize dynamicrange for long range detection (in power spectral density (PSD) as afunction of frequency). Curve 132 of FIG. 7 plots the PSD at theantennas generated by signal leakage or coupling as the transmit signalsand reflected signals pass through the cover layer(s) of device 10 fromfree space to antennas 40. Curve 132 may peak at a frequency such asfrequency F0. Curve 134 plots the expected PSD produced at the antennasby reflection of the transmit signals off external object 34 locatedwithin the USR domain (e.g., within 10 cm). Curve 134 may peak at afrequency such as frequency F1. Curve 136 plots the expected PSDproduced by reflection of the transmit signals off external object 34located within the long range domain (e.g., beyond 10 cm). Curve 136 maypeak at a frequency such as frequency F3.

Curve 130 plots the filter response of HPFs 76. As shown by curve 130,HPFs 76 may have a roll off (edge) frequency F2, a pass band atfrequencies greater than F2, and a stop band (e.g., notch) atfrequencies less than F2. Frequency F2 may be selected to be greaterthan frequency F1 and less than frequency F3. In this way, HPFs 76 mayfilter out the PSD associated with leakage or coupling (curve 132) fromthe reflected signals received and measured by radar circuitry 26. Thismay serve to maximize dynamic range for detecting range R to externalobject 34 in the long range domain. Since curve 134 is below frequencyF2, HPFs 76 need to be disabled (bypassed) to allow radar circuitry 26to receive the PSD produced by reflection off external object 34 (curve134), which is then used to identify the range to the external object(e.g., within 10 cm).

As described above, USR detection may involve the cancellation(subtraction) of background noise (e.g., at operation 116 of FIG. 5 ).Background noise cancellation may allow for USR detection with finerange resolution. FIG. 8 is a flow chart of illustrative operationsinvolved in gathering background measurements (e.g., as begun atoperation 110 of FIG. 5 ) and in applying the gathered backgroundmeasurements to USR detection operations (e.g., via backgroundsubtraction).

At operation 150, radar circuitry 26 may perform radar operations (e.g.,long range detection or USR detection at operations 112/114 of FIG. 5 ).Radar circuitry 26 may identify range R by performing radar operations,for example. Radar circuitry 26 may perform background recordingoperations/algorithm 152 (e.g., gathering and storing of backgroundnoise measurements for use in later background cancellation whileperforming USR operations) periodically, upon boot up, in the factory,upon software update, and/or in response to any desired triggercondition.

At operation 154, control circuitry 14 may determine whether range Rexceeds a long threshold value (e.g., 2 m, 10 cm, 1 m, other valuesgreater than or equal to 1 m or 0.5 m, etc.). If range R is less thanthis threshold value, there is an external object 34 located relativelyclose to device 10 and any subsequent measurements will not beindicative of the true background noise of the radar circuitry. As such,if range R does not exceed the long threshold value, processing may loopback to operation 150 via path 164. Range R may be determined usingrange circuitry 26 and/or other sensors on device 10 if desired.

If range R is greater than the long threshold value, there are noexternal objects 34 located relatively close to device 10 and processingmay proceed to operation 156. At operation 156, radar circuitry 26 mayperform other object detection (e.g., inanimate object detection) ifdesired. This may involve performing object detection using otherproximity sensors such as a voltage standing wave ratio (VSWR) sensorcoupled to one or more antennas 40.

At operation 158, control circuitry 14 may determine whether an objectwas detected at operation 156. This may involve, for example, comparingVSWR values to stored VSWR values associated with known inanimateobjects or may involve tracking changes in measured VSWR values overtime (e.g., where the amount of change in the VSWR values over time isless than a threshold amount over a predetermined time period). If noinanimate object is detected, processing may loop back to path 150 viapath 164. If an inanimate object is detected, this may be indicative ofa device case or other inanimate object being present on device 10. Itwould therefore be desirable to be able to characterize the backgroundnoise effects (e.g., which produces the PSD associated with curve 132 ofFIG. 7 ) that such an inanimate object has on radar circuitry 26 (e.g.,for later subtraction of the effects of the inanimate object onmeasurements of range R due to signal reflections, attenuation,diffraction, etc. as the signals pass through the inanimate object). Inother words, if an inanimate object is detected, processing may proceedto operation 160.

At operation 160, radar circuitry 16 may enter a USR backgroundrecording mode in which radar circuitry 16 gathers (measures) and storesbackground noise using the transmitted and received signals. Forexample, control circuitry 14 may switch HPFs 76 (FIG. 2 ) out of useand may switch APF 82 on bypass paths 78 into use. TX signal generator28 may transmit N tones over transmit chain 52. The N tones may bedefined from channel conditions such as resonance removal conditions(e.g., to measure channel performance). Control circuitry 14 may thenmemorize/record (e.g., measure and store) the amplitude and/or phase ofeach of the N tones as received over receive chain 54 (e.g., usingmeasurement of offset phases, least mean squares (LMS), least squares(SQ), etc. using a multi tab filter).

At operation 162, control circuitry 14 may run a background (BG)stabilizer on the recorded amplitudes and/or phases. The BG stabilizermay include decimation, averaging, and/or interpolation of the gatheredamplitudes and/or phases (e.g., stabilization operations that minimizenoise or otherwise enhance the time-stability of the data).

At operation 166, control circuitry 14 may determine whether the phaseand/or magnitude values are sufficiently stable after running the BGstabilizer. If the values are not sufficiently stable (e.g., exhibitexcessive change over a period of time, exhibit a stability value lessthan a threshold stability value, etc.), the values may be insufficientfor use in background cancellation and can be discarded (e.g.,processing may loop back to operation 150 via path 164). If the valuesare sufficiently stable (e.g., exhibit relatively little change over aperiod of time, exhibit a stability value greater than a thresholdstability value, etc.), the values may be satisfactory for use inbackground cancellation and processing may proceed to operation 170 viapath 168.

At operation 170, control circuitry 14 (radar circuitry 26) may performBG substation operations that configure radar circuitry 26 (e.g.,digital BG canceller 56) to mitigate/cancel/subtract out themeasured/recorded background noise during subsequent radar operations.Processing may proceed to operation 150 and radar operations may beperformed while subtracting out the background noise as configuredduring operation 170. For example, digital BG canceller 56 may performcomplex subtraction, multi-tab LMS, and/or LS on subsequentlytransmitted and/or received signals used in performing USR detection(e.g., at operation 114 of FIG. 5 ).

FIG. 9 is a flow chart showing how these operations may be adapted toimplementations in which radar circuitry 26 is operable to perform shortrange detection and then USR detection.

At operation 180, radar circuitry 26 may perform short range (SR)detection using transmitted and reflected signals. SR detection may beat longer ranges than USR but shorter ranges than far field detection.Radar circuitry 26 may then perform background recordingoperations/algorithm 152.

At operation 166, control circuitry 14 may determine whether the phaseand/or magnitude values are sufficiently stable after running the BGstabilizer in background recording operations/algorithm 152. If thevalues are not sufficiently stable, processing may loop back tooperation 180 via path 164. If the values are sufficiently stable,processing may proceed to operation 170 via path 168.

At operation 170, radar circuitry 26 may perform USR detection usingtransmitted and reflected signals (e.g., transmit signals as shown bycurve 102 of FIG. 3 ). Radar circuitry 26 may perform USR detectionwhile subtracting/cancelling out background noise as recorded whileperforming background recording operations/algorithm 152 after operation180. Radar circuitry 26 may then repeat the background recordingoperations/algorithm as background recording operations/algorithm 152′.Background recording operations/algorithm 152′ may loop back tooperation 170.

FIG. 10 is a flow chart showing how these operations may be adapted toimplementations in which radar circuitry 26 is operable to perform longrange detection and then USR detection. At operation 200, radarcircuitry 26 may perform long range detection using transmitted andreflected signals (e.g., using FMCW signals such as the signalsassociated with curve 100 of FIG. 3 ). Radar circuitry 26 may gathermeasurements of range R during operation 200.

If/when range R exceeds the long threshold value (e.g., 2 m) during thelong range radar operations, radar circuitry 26 may proceed withperforming background recording operations/algorithm 152. Backgroundrecording operations/algorithm 152 may produce and store backgroundnoise values for use during later USR operations, and processing mayloop back to operation 200 via path 202.

During the long range radar operations, control circuitry 14 maydetermine whether range R falls below a short threshold value (e.g., 10cm) (at operation 204). If range R does not fall below the shortthreshold value, processing may loop back to operation 200 via path 206.If range R falls below the short threshold value, processing may proceedto operation 206.

At operation 206, radar circuitry 26 may perform a stable statisticdetermination (e.g., operation 166 of FIG. 8 ) on the backgroundmeasurements gathered during background recording operations/algorithm152. If the background measurements are sufficiently stable, radarcircuitry 26 may perform USR detection (e.g., by transmitting andreceiving signals such as the signals associated with curve 102 of FIG.3 ) while performing background cancellation using the backgroundmeasurements gathered during background recording operations/algorithm152 (e.g., via complex subtraction of the background measurements fromthe phase measurements gathered in the USR detection). If the backgroundmeasurements are not sufficiently stable, radar circuitry 26 may performSR detection (e.g., operation 180 of FIG. 9 ).

At operation 208, control circuitry 14 may determine if range R hasfallen below the short threshold (e.g., 5 cm). If range R as detectedduring SR detection falls below 5 cm, processing may loop back tooperation 206 via path 210. If range R is not below 5 cm, processing mayloop back to operation 200 via path 206. HPF filters 76 (FIG. 2 ) may beswitched into use on receive chain 54 at operation 200. Performingbackground noise subtraction may allow radar circuitry 26 to detectranges R that are less than 5 cm, for example.

Device 10 may gather and/or use personally identifiable information. Itis well understood that the use of personally identifiable informationshould follow privacy policies and practices that are generallyrecognized as meeting or exceeding industry or governmental requirementsfor maintaining the privacy of users. In particular, personallyidentifiable information data should be managed and handled so as tominimize risks of unintentional or unauthorized access or use, and thenature of authorized use should be clearly indicated to users.

The methods and operations described above may be performed by thecomponents of device 10 using software, firmware, and/or hardware (e.g.,dedicated circuitry or hardware). Software code for performing theseoperations may be stored on non-transitory computer readable storagemedia (e.g., tangible computer readable storage media) stored on one ormore of the components of device 10 (e.g., storage circuitry 16 of FIG.1 ). The software code may sometimes be referred to as software, data,instructions, program instructions, or code. The non-transitory computerreadable storage media may include drives, non-volatile memory such asnon-volatile random-access memory (NVRAM), removable flash drives orother removable media, other types of random-access memory, etc.Software stored on the non-transitory computer readable storage mediamay be executed by processing circuitry on one or more of the componentsof device 10 (e.g., processing circuitry 18 of FIG. 1 , etc.). Theprocessing circuitry may include microprocessors, central processingunits (CPUs), application-specific integrated circuits with processingcircuitry, or other processing circuitry.

The foregoing is merely illustrative and various modifications can bemade to the described embodiments. The foregoing embodiments may beimplemented individually or in any combination.

What is claimed is:
 1. A method of operating an electronic devicecomprising: with wireless circuitry, transmitting radio-frequencysignals and receiving reflected signals to identify a range between anexternal object and the electronic device; when the range exceeds athreshold value, controlling the wireless circuitry to record backgroundnoise using the transmitted radio-frequency signals; with the wirelesscircuitry, performing phase measurements from the received reflectedsignals; and with the wireless circuitry, detecting the range based onthe phase measurements and the recorded background noise.
 2. The methodof claim 1, wherein detecting the range comprises subtracting therecorded background noise from the phase measurements.
 3. The method ofclaim 2, further comprising: performing stabilization on the recordedbackground noise.
 4. The method of claim 3, further comprisingdiscarding the recorded background noise when the recorded backgroundnoise is excessively unstable and subtracting the recorded backgroundnoise from the phase measurements when the recorded background noise issufficiently stable.
 5. The method of claim 1, wherein the thresholdvalue is greater than or equal to 10 cm.
 6. The method of claim 5,wherein the threshold value is greater than or equal to 2 m.
 7. Themethod of claim 1, wherein recording the background noise comprises:gathering voltage standing wave ratio (VSWR) values using the wirelesscircuitry; performing radar operations when the VSWR values indicatethat no external objects are present near the wireless circuitry; andrecording the background noise when the VSWR values indicate that theexternal object is present near the wireless circuitry.
 8. The method ofclaim 1, further comprising: decimating and averaging the recordedbackground noise prior to detecting the range based on the phasemeasurements and the recorded background noise.
 9. The method of claim1, wherein the transmitted radio-frequency signals comprise chirpsignals.
 10. A method of operating an electronic device comprising: withwireless circuitry, performing frequency-modulated continuous-wave(FMCW) radar operations to identify a range between an external objectand the electronic device by transmitting radio-frequency signals andreceiving reflected signals; when the range exceeds a first thresholdvalue, recording background noise at the wireless circuitry using thetransmitted radio-frequency signals; and when the range is less than asecond threshold value that is lower than the first threshold value,performing phase measurements from the received reflected signals anddetecting the range based on the phase measurements and the recordedbackground noise.
 11. The method of claim 10, wherein identifying therange comprises subtracting the recorded background noise from the phasemeasurements.
 12. The method of claim 11, further comprising subtractingthe recorded background noise from the phase measurements when thebackground noise exhibits a stability value that exceeds a thresholdstability value.
 13. The method of claim 10, further comprising:adjusting a transmit power level of the wireless circuitry based on thedetected range.
 14. The method of claim 10, wherein the first thresholdvalue is greater than or equal to 0.5 m.
 15. The method of claim 14,wherein the second threshold value is less than or equal to 10 cm. 16.The method of claim 10, wherein the second threshold value is less thanor equal to 10 cm.
 17. An electronic device comprising: one or moreantennas configured to transmit radio-frequency signals and to receivereflected signals; and one or more processors configured to identify arange between the electronic device and an external object based on thereflected signals received by the one or more antennas, when the rangeexceeds a first threshold value, record background noise using theradio-frequency signals transmitted by the one or more antennas andcorresponding signals received by the one or more antennas; and when therange is less than a second threshold value that is lower than the firstthreshold value, detect the range based on phase measurements from thereflected signals received by the one or more antennas and based on therecorded background noise.
 18. The electronic device of claim 17,wherein the one or more processors is configured to detect the range bysubtracting the recorded background noise from the phase measurements.19. The electronic device of claim 17, wherein the radio-frequencysignals transmitted by the one or more antennas comprise chirp signals.20. The electronic device of claim 17, wherein the first threshold valueis greater than or equal to 0.5 m and the second threshold value is lessthan or equal to 10 cm.